<template>
	<view class="p20r">
		<view class="backColWhite borRad10r pl20r pr20r pb20r">
			<view class="lh80r foWeiBold f32r">
				订单信息
			</view>
			<view class="disFlex aliItCenter">
				<view class="w120r col999">
					订单号
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.out_trade_no}}
					<text class="pl20r pr20r lh60r bor1SDadada ml10r borRad5r mt5r"
						@click="cliCopyBtn"
					>
						复制
					</text>
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					服务时间
				</view>
				<view class="flex1 teAliRight foWeiBold">
					<view>
						开始：{{optionItem.start_time}}
					</view>
					<view class="mt10r">
						结束：{{optionItem.end_time}}
					</view>
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					服务时长
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.hour}}小时
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					订单类型
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{
						optionItem.order_type == 1 ? '预约订单' :
						optionItem.order_type == 2 ? '立即使用订单' : optionItem.order_type
					}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w200r col999">
					正常单/续单
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{
						optionItem.order_status == 1 ? '正常单' :
						optionItem.order_status == 2 ? '续单' : optionItem.order_status
					}}
				</view>
			</view>
			<view class="disFlex mt20r" v-show="optionItem.order_status == 2">
				<view class="w140r col999">
					被续订单号
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.front_out_trade_no}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					保洁时至
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.clear_end_time}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					下单时间
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.date}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w200r col999">
					订单¥/小时
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.price}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					订单总价
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{optionItem.amount}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					会员卡
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{
						optionItem.is_cardrule == 1 ? '未使用' :
						optionItem.is_cardrule == 2 ? '已使用' : optionItem.is_cardrule
					}}
				</view>
			</view>
			<view class="disFlex mt20r">
				<view class="w120r col999">
					订单状态
				</view>
				<view class="flex1 teAliRight foWeiBold">
					{{
						optionItem.make_status == 1 ? '未使用' :
						optionItem.make_status == 2 ? '已使用' :
						optionItem.make_status == 3 ? '已完成' : optionItem.make_status
					}}
				</view>
			</view>
		</view>
	</view>
</template>
<script>
import { inquiryToLogin } from '@/utils/utils.js'
export default {
	data() {
		return {
			optionItem: {},
			
		}
	},
	onLoad(options) {
		inquiryToLogin().then(res => {
			if(options.item) {
				this.optionItem = JSON.parse(options.item);
				console.log(this.optionItem)
			}
		});
	},
	methods: {
		cliCopyBtn() {
			uni.setClipboardData({ data: this.optionItem.out_trade_no });
		},
	}
}
</script>
<style>
</style>